<?php

namespace App\Mail;

use App\Apply;
use App\User;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;

class applySend extends Mailable
{
    use Queueable, SerializesModels;
    protected  $apply;
    protected  $teacher;
    public  $view;
    protected  $pass_url;
    protected  $deny_url;
    protected  $key_data;

    /**
     * Create a new message instance.
     *
     * @return void
     */
    public function __construct(Apply $a,User $t,$v,$pass_url,$deny_url,$data='')
    {
        $this->apply=$a;
        $this->teacher=$t;
        $this->view=$v;
        $this->pass_url=$pass_url;
        $this->deny_url=$deny_url;
        $this->key_data=$data;

    }

    /**
     * Build the message.
     *
     * @return $this
     */
    public function build()
    {
        return $this->view($this->view,['apply'=>$this->apply,'teacher'=>$this->teacher,'pass_url'=>$this->pass_url,'deny_url'=>$this->deny_url,'key_data'=>$this->key_data]);
    }
}
